<!DOCTYPE html>
<html lang="en" dir="ltr">
  <head>
    <meta charset="UTF-8" />
    <title>Item - Disabled</title>
    <meta
      name="viewport"
      content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no"
    />
    <link href="../../../../../css/ionic.bundle.css" rel="stylesheet" />
    <link href="../../../../../scripts/testing/styles.css" rel="stylesheet" />
    <script src="../../../../../scripts/testing/scripts.js"></script>
    <script type="module" src="../../../../../dist/ionic/ionic.esm.js"></script>
  </head>

  <body>
    <ion-app>
      <ion-header>
        <ion-toolbar>
          <ion-title>Item: Disabled</ion-title>
        </ion-toolbar>
      </ion-header>

      <ion-content class="ion-padding-vertical">
        <ion-list>
          <ion-list-header>
            <ion-label>Single Input Disabled Items</ion-label>
          </ion-list-header>

          <ion-item disabled>
            <ion-label>Disabled Item</ion-label>
          </ion-item>

          <ion-item disabled button>
            <ion-label>Disabled Item Button</ion-label>
          </ion-item>

          <ion-item disabled href="#">
            <ion-label>Disabled Item Anchor</ion-label>
          </ion-item>
        </ion-list>
      </ion-content>

      <ion-footer>
        <ion-toolbar>
          <ion-buttons slot="start">
            <ion-button onClick="toggleDisabled()">Toggle</ion-button>
          </ion-buttons>
        </ion-toolbar>
      </ion-footer>
    </ion-app>

    <script>
      const disabledEls = document.querySelectorAll('[disabled]');

      function toggleDisabled() {
        for (var i = 0; i < disabledEls.length; i++) {
          disabledEls[i].disabled = !disabledEls[i].disabled;
        }
      }
    </script>
  </body>
</html>
